package com.object.ip;

import lombok.Data;

/**
 * @author Li Qing
 * date: 2025/5/1 20:45
 * description:
 */
@Data
public class IpInfo {
    private String IPV4;
    private String Isp;
    private String Country;
    private String City;
    private String CountryCode;
    private String ASN;
    private String Province;
    private String Districts;


    public String getInfo() {
        return IPV4 + "(" + Country + "-" + City + "-" + Province + getDistrictsT()+")" + "-" + Isp;
    }

    private String getDistrictsT() {
        if (Districts == null) {
            return "";
        } else {
            return "-"+Districts;
        }
    }
}
